<template>
	<view class="content">
		<button type="primary" @tap="doss">点击签名</button>

		<view class="imgs">
			<image class="img" :src="img" mode="widthFix"></image>
		</view>	
		<catSignature canvasId="canvas1"  @close="close" @save="save" :visible="isShow" />
	</view>
</template>

<script>
	import catSignature from "@/components/cat-signature/index.vue"
	export default {
		components:{catSignature},
		data() {
			return {
				img:'',
				isShow:false,
			}
		},
		onLoad() {
		},
		methods: {
			doss(){
				this.isShow = true;
			},
			close(){
				this.isShow = false;
			},
			save(val){
				this.isShow = false;
				this.img = val  //base64图片
			},
		
		}
	}
</script>

<style>
	.imgs{width: 500upx;height: 500upx;display: flex;margin: 0 auto;flex-wrap: wrap;}
	.imgs img{width: 100%; height: 100%;}
</style>